package exception;

public class TestDemo {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        try{
        System.out.println(arr[1]);
        System.out.println(arr[5]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("数组越界异常");
        }finally {
            System.out.println("程序结束了");
        }


    }
}
